<%@ page language="java" pageEncoding="utf-8"%>
<%@page import="com.farm.web.constant.FarmConstant"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="/view/conf/farmtag.tld" prefix="PF"%>
<div style="top: -50px; padding: 0px; margin-top: 20px;">
	<div class="panel panel-default"
		style="filter: progid:DXImageTransform.Microsoft.Shadow(color=#909090, direction=120, strength=4); -moz-box-shadow: 2px 2px 10px #909090; -webkit-box-shadow: 2px 2px 10px #909090; box-shadow: 2px 2px 10px #909090;">
		<div class="panel-body" style="width: 100%;">
			<c:if
				test="${USEROBJ==null||learnView.userclass==null||learnView.userclass.pstate!='3'}">
				<div style="padding-top: 10px; padding-bottom: 10px;">
					<c:if
						test="${USEROBJ!=null&&(learnView.learned||classview.classt.jointype=='1')}">
						<a href="hourweb/PubContinue.do?classid=${classview.classt.id}"
							class="btn btn-danger  btn-lg"
							style="width: 100%; margin-top: 10px; margin-bottom: 10px;">
							<i class="glyphicon glyphicon-play-circle" style="top: 3px;"></i>&nbsp;
							<c:if test="${learnView.learned }">
							继续学习
						</c:if> <c:if test="${!learnView.learned }">
							开始学习
						</c:if>
						</a>
					</c:if>
					<c:if
						test="${USEROBJ!=null&&(!learnView.learned&&classview.classt.jointype=='2')}">
						<div style="text-align: center; font-weight: 700;">
							该课程需要由管理员指定学习</div>
					</c:if>
					<c:if test="${USEROBJ==null&&classview.classt.jointype=='1'}">
						<div style="text-align: center; font-weight: 700;">请登录后学习</div>
					</c:if>
					<c:if test="${classview.classt.viewnum>0}">
						<c:if test="${USEROBJ==null||!learnView.learned  }">
							<a href="hourweb/Pubview.do?classid=${classview.classt.id}"
								class="btn btn-warning"
								style="width: 100%; margin-top: 10px; margin-bottom: 10px;">
								<i class="glyphicon glyphicon-eye-open" style="top: 3px;"></i>&nbsp;
								预览课程
							</a>
						</c:if>
					</c:if> 
				</div>
			</c:if>
			<c:if
				test="${USEROBJ!=null&&learnView.userclass!=null&&learnView.userclass.pstate=='3'}">
				<a href="hourweb/PubContinue.do?classid=${classview.classt.id}"
					class="btn  btn-success  btn-lg"
					style="width: 100%; margin-top: 20px; margin-bottom: 20px;"> <i
					class="glyphicon glyphicon-play-circle" style="top: 3px;"></i>&nbsp;
					复习课程（已完成）
				</a>
			</c:if>
			<img class="img-rounded"
				style="width: 100%; margin-top: 0px; margin-bottom: 20px;"
				src="${classview.imgurl}">
			<div class="wlp-userspace-h2"
				style="margin-left: -20px; text-align: center;">
				<c:if test="${USEROBJ==null }">未登录用户</c:if>
				<c:if test="${USEROBJ!=null }">${USEROBJ.name}：
					<c:if test="${learnView.learned }">
							学习进度${learnView.userclass.process }%
					</c:if>
					<c:if test="${!learnView.learned }">
							未学习该课程
					</c:if>
				</c:if>
			</div>
			<hr style="margin-bottom: 10px;" class="wlp-userspace-hr">
			<c:if test="${USEROBJ!=null&&learnView.learned }">
				<!-- 学习进度条 -->
				<div class="progress" title="${learnView.userclass.process }%">
					<c:if test="${learnView.userclass.process<100}">
						<div
							class="progress-bar progress-bar-danger progress-bar-striped active"
							role="progressbar" aria-valuenow="20" aria-valuemin="0"
							aria-valuemax="100"
							style="width: ${learnView.userclass.process }%">
							${learnView.userclass.process }%</div>
					</c:if>
					<c:if test="${learnView.userclass.process>=100}">
						<div
							class="progress-bar progress-bar-success progress-bar-striped"
							role="progressbar" aria-valuenow="20" aria-valuemin="0"
							aria-valuemax="100"
							style="width: ${learnView.userclass.process }%">
							${learnView.userclass.process }%</div>
					</c:if>
				</div>
			</c:if>
			<div style="text-align: center; color: #999999;">本课程总学时${classview.classt.altime }分钟</div>
		</div>
	</div>
</div>